package de.cbf.cam.dsa.services.interfaces.rcp_provider;

import de.cbf.cam.dsa.rcp.model.entities.CultureDSA;
import de.cbf.cam.dsa.rcp.model.entities.ProfessionDSA;
import de.cbf.cam.dsa.rcp.model.entities.RaceDSA;
import de.cbf.cam.dsa.services.interfaces.rcp_provider.exceptions.CultureNotFoundException;
import de.cbf.cam.dsa.services.interfaces.rcp_provider.exceptions.EntityNotFoundException;
import de.cbf.cam.dsa.services.interfaces.rcp_provider.exceptions.ProfessionNotFoundException;
import de.cbf.cam.dsa.services.interfaces.rcp_provider.exceptions.RaceNotFoundException;
import de.cbf.util.uuidheader.entities.UUIDReference;
import de.cbf.util.uuidheader.entities.UUIDHeader;
import de.cbf.util.uuidheader.util.EntityWeightedList;

public interface IServiceDSARCPFinder {

	public static final String PROVIDER_RACE 		= "provider.race";
	public static final String PROVIDER_CULTURE 	= "provider.culture";
	public static final String PROVIDER_PROFESSION 	= "provider.profession";

	/**
	 * get display name of provider
	 * @return
	 */
	public String getName();

	/**
	 * method to find possible cultures from a combination of a race and a profession
	 * @param race
	 * @param profession
	 * @return
	 * @throws CultureNotFoundException - if no cultures exists that could match that combination
	 */
	public EntityWeightedList findCulturesBy(RaceDSA race, ProfessionDSA profession)throws CultureNotFoundException;

	public EntityWeightedList findRacesBy(CultureDSA culture, ProfessionDSA profession) throws RaceNotFoundException;

	public EntityWeightedList findProfessionsBy(RaceDSA race, CultureDSA culture)throws ProfessionNotFoundException;

	public UUIDHeader resolveEntity(UUIDReference nameUUID, String provider) throws EntityNotFoundException;

}
